#!/bin/sh

echo "START buildRhoBundle script"

if [ "$RHO_BUNDLE_ALREADY_BUILDED" = "YES" ]
then

RHO_BUNDLE_ALREADY_BUILDED="NO"
echo "RhoBundle already builded !"

else

echo "RhoBundle should BUILD !"

RHO_BUNDLE_ALREADY_BUILDED="NO"

. ~/.profile
cd ../..

ruby --version

TARGET_RHODESLIBS_DIR=${SRCROOT}

echo "START build bundle ..."

rake build:iphone:rhobundle

echo "FINISH build bundle ..."

RHO_BUNDLE_ALREADY_BUILDED="NO"

fi

echo "FINISH buildRhoBundle script"
